﻿@{
    //资讯列表
    int page = ViewBag.PageIndex;
    string kw = ViewBag.Keyword;
    int i = 0;
}
@model Newss
<div class="content-box">
    <div class="content-box-header">
        <h3 style="cursor: s-resize;">资讯管理</h3>
        <ul class="content-box-tabs">
            <li><a href="javascript:;" class="default-tab current" id="List">列表</a></li>
            <li><a href="@Url.DomainRouteUrl(AreasConfig.Admin, new { action = "Edit", controller = "News", md = "add", page = 1 })">表单</a></li>
        </ul>
        <div class="clear"></div>
    </div>
    <div class="content-box-content">
        <div class="tab-content default-tab" id="tab1">
            <div class="">
                <form action="@Url.DomainRouteUrl(AreasConfig.Admin, "Index", "News")">
                    <select name="" class="">
                        <option value="1">--条件1--</option>
                        <option value="2">Option 2</option>
                        <option value="3">Option 3</option>
                        <option value="4">Option 4</option>
                    </select>
                    <input type="text" name="kw" value="" class="text-input" placeholder="按资讯标题搜索" />
                    <button type="submit" value="">搜索</button>
                </form>
            </div>
            <table>
                <thead>
                    <tr>
                        <th>
                            <input class="check-all" type="checkbox">
                        </th>
                        <th>资讯标题</th>
                        <th>资讯类别</th>
                        <th>发布人</th>
                        <th>发布时间</th>
                        <th>修改时间</th>
                        <th>最后修改人</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody>
                    @foreach (var item in Model.Items)
                    {
                        i++;
                        <tr class="@(i % 2 == 0 ? "" : "alt-row")">
                            <td>
                                <input type="checkbox">
                            </td>
                            <td><a href="@Url.DomainRouteUrl(AreasConfig.Admin,new{action="Detail",collection="News",id=item.NewsId})" target="_blank" title="@(item.NewsTitle)"> @item.NewsTitle</a></td>
                            <td></td>
                            <td>@item.AdminUserId</td>
                            <td>@item.AddTime</td>
                            <td></td>
                            <td></td>
                            <td>
                                @Html.ActionLink("修改", "Edit", new { id = item.NewsId, md = "update", page = page, kw = kw })
                                &nbsp;&nbsp;&nbsp;&nbsp;
                                @Html.ActionLink("删除", "Delete", new { id = item.NewsId, page = page, kw = kw }, new { onclick = "return confirm('确定要删除吗？');" })
                            </td>
                        </tr>
                    }
                </tbody>
            </table>
        </div>
    </div>
</div>

